import React, { Component } from 'react'
import Child7 from '../component/Child7'
import Child8 from '../component/Child8'
export default class CTC extends Component {
    constructor(props){
        super(props);
        this.state={
            str:""
        }
    }
    add=(n)=>{
        this.setState({
            str:n
        })
    }
  render() {
    
    return (
      <div>
          <Child7 add={this.add}></Child7>
          <hr></hr>
          <div>父组件中转站的值是：{this.state.str}</div>
          <hr></hr>
          <Child8 str={this.state.str}></Child8>
      </div>
    )
  }
}
